interface Counter {
  (star: number): string,
  interval: number
  reset(): void
}

function getCounter(): Counter {
  let counter = (function (star: number) {}) as Counter
  counter.interval = 123
  counter.reset = function() {
    console.log('hello')
  }
  return counter
}

let c = getCounter()
c.reset()  //hello
c.interval = 5.0
c(10)

